﻿@model IEnumerable<TVShows_EF5.Models.TVShow>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<form>
<label>
    <span>Buscar show: </span>
    <input type="text" name="term" />
</label>
<input type="submit" />
</form>

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.foto)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            <a href="~/Temporada/Index/@item.id" target="_blank">
                @Html.DisplayFor(modelItem => item.nombre)
            </a>
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.foto)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.id }) |
            @Html.ActionLink("Details", "Details", new { id=item.id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.id })
        </td>
    </tr>
}

</table>
